<template>
	<div id="app">
		<keep-alive :include="storage ? storage : '--'">
			<router-view />
		</keep-alive>
	</div>
</template>

<script>
import { mapGetters } from 'vuex';

export default {
	name: 'App',
	data() {
		return {};
	},
	computed: {
		...mapGetters('storageRoutes', {
			// 缓存组件的数组
			getStorage: 'getRoutes'
		}),
		storage() {
			return this.getStorage.join(',');
		}
	},
	mounted() {}
};
</script>

<style lang="scss">
@import url(../../assets/style/common.css); // 常用样式表 - xy
</style>
